<?php
/**
 * InfoController.php
 *
 * @category    Madoqua
 * @package     Module
 * @subpackage  Admin
 */

/** base class */
require_once 'Madoqua/Controller/Action/Abstract.php';

/**
 * Admin_InfoController
 *
 * information about the logged in user
 *
 * @category    Madoqua
 * @package     Module
 * @subpackage  Admin
 */
class Admin_InfoController extends Madoqua_Controller_Action_Abstract
{
    /**
     * information about the currently logged in user
     */
    public function infoAction()
    {
        $this->view->user = $this->_user;
        //the user
    }

    /**
     * fetch a nice rss feed to display
     *
     * @todo cache it. cache it GOOD.
     */
    public function rssAction()
    {
        $this->_modelLoader->load('Admin_News');
        if(Madoqua_Application::inDevelopment()) {
            $rss = Admin_News::fetchIssues();
        } else {
            $rss = Admin_News::fetch();
        }

        $this->view->rss = $rss;
    }
}